// pages/add/progress.js
Page({
  data: {
    iconName:'',
    color:'#F6F6F6',
    title:'',
    describe:'',
    type:'',
    now:'',
    total:'',
    unit:'',
    every:'',
    box:'',
    inFile:false,
    record:false,
    frame:false,

    iconPop:false,
    colorPop:false,
    buttonactive:0
  },
  _chooseIcon(e){
    console.log('icon',e)
    this.setData({iconPop:true})
  },
  __iconName(e){
    console.log(e.detail)
    this.setData({
      iconName:e.detail
    })
  },
  _iconPop(){
    this.setData({iconPop:false})
  },

  _chooseColor(e){
    console.log('color',e)
    this.setData({colorPop:true})
  },
  __colorName(e){
    this.setData({color:e.detail})
  },
  _colorPop(){
    this.setData({colorPop:false})
  },
  changeButoonActive(e){
    console.log(e)
    this.setData({
      buttonactive:e.currentTarget.dataset.i
    })
  },
  _inFile(e) {
    console.log(e)
    this.setData({
      inFile: e.detail.value,
    });
    console.log(this)
  },
  _record(e){
    this.setData({
      record: e.detail.value,
    });
  },
  _frame(e){
    this.setData({
      frame: e.detail.value,
    });
  },

  fk(){
    wx.openEmbeddedMiniProgram({
      appId: 'wxebadf544ddae62cb',
      path: 'pages/survey/index?sid=10560682&hash=0548',
    });
  },
  onLoad(options) {

  },
  onReady() {

  },
  onShow() {

  },
  onHide() {

  },
  onUnload() {

  },
  onPullDownRefresh() {

  },
  onReachBottom() {

  },
  onShareAppMessage() {

  }
})